home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01a.txt / 000049_icon-group-sender _Thu Jun 1 16:56:55 2000.msg < prev    next >
Internet Message Format  |  2002-01-03  |  3KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id QAA15837
  4.     for icon-group-addresses; Thu, 1 Jun 2000 16:56:35 -0700 (MST)
  5. Message-Id: <200006012356.QAA15837@baskerville.CS.Arizona.EDU>
  6. Date: Thu, 01 Jun 2000 14:10:08 -0700
  7. From: Steve Wampler <swampler@noao.edu>
  8. X-Accept-Language: en
  9. To: icon-group <icon-group@optima.CS.Arizona.EDU>
  10. Subject: Re: CODE() and  @/2
  11. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  12. Status: RO
  13. Content-Length: 2115
  14.  
  15. "F.G. van DORP" wrote:
  16. > On 30 May 2000 20:09:35 -0400, Steve Wampler <swampler@noao.edu> wrote:
  17. > >"F.G. van DORP" wrote:
  18. > >
  19. > >> I tried
  20. > >>
  21. > >>        nextLabel := create "L" || (1 to 10) || ("foo" @ &source)
  22. > >
  23. > >What did you intend the above to do?
  24. > ....to find out if binary @ behaves like a regular RETURN
  25.  
  26. Ah, it "sortof" does, but when you reactivate the co-expression, you're
  27. going to resume execution as if you've returned from "foo" @ &source
  28. (with the &null value since the activation "@nextLabel" is unary.)
  29. This &null value can't be concatentated to the string you're
  30. building.
  31.  
  32. > >
  33. > >        nextLabel := create "L" || (1 to 10) || "foo"
  34. > >
  35. ...
  36. > Under my ICON (Windows Icon  v.9.3.1, Wi  v.1.01)  above example
  37. > prints "L1foo" immediately followed by an illegal op. error.
  38.  
  39. Hmmm, can you email me the full program where this is happening?
  40. I'd like to take a closer look...
  41.  
  42. > I f  you change it to, let's say
  43. >              procedure main
  44. >              nextLabel := create (("L" || (1 to 10) || "foo") @ &source)
  45. >              write("1 ",@nextLabel)
  46. >              write("2 ",@nextLabel)
  47. >              write("3 ",@nextLabel)
  48. >              write("4 ",@nextLabel)
  49. >              write("5 ",@nextLabel)
  50. >              end
  51. > it prints
  52. >              "1 L1foo"
  53. >              "2"
  54. >              "3 L2foo"
  55. >              "4"
  56. >               illegal op error
  57. > This behavior doesn't change if you replace ("L" || (1 to 10) || "foo")
  58. > with any other generator, nor  &source with  &main in this particular example.
  59.  
  60. Well, that's nearly correct (except for the illegal op error at the end...):
  61.  
  62. I get:
  63.  
  64. 1 L1foo
  65. 3 L2foo
  66. 5 L3foo
  67.  
  68. You shouldn't have the @source there, it's not doing what you want, because
  69. you're "returning" into the co-expression...
  70.  
  71. However, it does look like there is a bug in 9.3.1 for Windows.  Please
  72. email me the exact program (I can tell you had to type the above one
  73. in by hand...)!
  74.  
  75. I don't see this problem under either 9.3 or 9.3.2 with either Linux
  76. or Solaris.
  77.  
  78. --
  79. Steve Wampler-  SOLIS Project, National Solar Observatory
  80. swampler@noao.edu
  81.